<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/js/jquery-1.11.0.min.js"></script>
    <script>
        $(function () {
            $("#find").click(function () {
                $.get("/user/findAll",{},function (data) {
                    $("#user_body").empty();
                    for (var i = 0; i <data.length ; i++) {
                        var user=data[i];
                        var user_item=" <tr>\n" +
                            "                <td>"+user.id+"</td>\n" +
                            "                <td>"+user.username+"</td>\n" +
                            "                <td>"+user.birthday+"</td>\n" +
                            "                <td>"+user.sex+"</td>\n" +
                            "                <td>"+user.address+"</td>\n" +
                            "            </tr>"

                        $("#user_body").append(user_item)
                    }

                })

            })

        })
    </script>
</head>
<body>
        <button id="find">查询所有用户 </button>
        <table border="1px" width="40%">
            <thead>
            <tr>
                <td>编号</td>
                <td>姓名</td>
                <td>生日</td>
                <td>性别</td>
                <td>地址</td>
            </tr>
            </thead>
            <tbody id="user_body"></tbody>
        </table>
</body>
</html>